package com.jame.basics.lambda;

import org.junit.Test;

/**
 * @author : Jame
 * @date : 2020-12-29 19:04
 **/
public class MyTest {
    /**
     * 调用非静态方法
     * @param args
     */
    @Test
    public  void test1(String[] args) {
        MyTest test = new MyTest();
        Mylambda myLambda= test::doSum;
    }

    public  int doSum(int a,int b){
        return a+b;
    }

    /**
     * 调用静态的方法
     * @param args
     */
    public static void main(String[] args) {
        Mylambda myLambda= MyTest::doSumStatic;
    }

    public static int doSumStatic(int a,int b){
        return a+b;
    }
}
